<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link href="/lib/layui/css/layui.css" rel="stylesheet"/>
    <link href="/css/common.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/lib/dtree/dtree.css">
    <link rel="stylesheet" href="/lib/dtree/font/dtreefont.css">
    <title>查看错误日志</title>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space10">
        <div class="layui-card">
            <div class="layui-card-body">
                <form class="layui-form">
                    <div class="layui-form-item">
                        <label class="layui-form-label">&nbsp;类名称：</label>
                        <div class="layui-input-block">
                            <input class="layui-input" type="text" name="className" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">&nbsp;方法名称：</label>
                        <div class="layui-input-block">
                            <input class="layui-input" type="text" name="functionName" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">&nbsp;接口名称：</label>
                        <div class="layui-input-block">
                            <input class="layui-input" type="text" name="functionUrl" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">&nbsp;接口类型：</label>
                        <div class="layui-input-block">
                            <input class="layui-input" type="text" name="functionType" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">&nbsp;访问用户：</label>
                        <div class="layui-input-block">
                            <input class="layui-input" type="text" name="userName" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">&nbsp;访问地址：</label>
                        <div class="layui-input-block">
                            <input class="layui-input" type="text" name="ipAddress" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">&nbsp;访问时间：</label>
                        <div class="layui-input-block">
                            <input class="layui-input" type="text" name="createTime" readonly>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">&nbsp;错误日志：</label>
                        <div class="layui-input-block">
                            <textarea class="layui-textarea" name="description" style="height: 200px" readonly></textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn layui-btn-primary" type="button" id="cancel">关闭</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script src="/lib/layui/layui.all.js" charset="utf-8"></script>
<script src="/script/common.js" charset="utf-8"></script>
<script>
    var id = getRequestParams('id');

    layui.use(['baseUtil'], function () {
        var $ = layui.jquery,
            baseUtil = layui.baseUtil;

        baseUtil.initDict('operateType', function (dictContent) {
            var url = '/system/errorlog/findOne.do';
            var params = { id: id };
            var cols = [
                { type: 'input', name: 'className' },
                { type: 'input', name: 'functionName' },
                { type: 'input', name: 'functionUrl' },
                { type: 'input', name: 'userName' },
                { type: 'input', name: 'ipAddress' },
                { type: 'input', name: 'createTime' },
                { type: 'textarea', name: 'description' }
            ];
            baseUtil.initFormData(url, params, cols, function (data) {
                $('input[name="functionType"]').val(baseUtil.showDictContent(dictContent, 'operateType', data.functionType))
            });
        });
    });
</script>
</body>
</html>
